package com.jt.test;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class MoneyThread extends Thread {
    private String name;
    private Money money;


    public MoneyThread(String name, Money money) {
        super(name);
        this.money=money;
    }

    public Money getMoney() {
        return money;
    }

    public void setMoney(Money money) {
        this.money = money;
    }

    @Override
    public void run() {
            System.out.println(Thread.currentThread().getName()+">>>>>>>>"+money.getNumber());
            money.quqian(100000);

        }

}
